<?php

/**
 * @author Edison P. Quinones Jr
 * @version  1.0.0
 * @copyright 2008
 */

class JumpstartController extends Zend_Controller_Action
{
	function init()
	{
		$this->initView();
		$this->view->baseUrl = $this->_request->getBaseUrl();
		$webInfoNamespace  = new Zend_Session_Namespace('webInfo');
		$this->view->webInfo = $webInfoNamespace->webInfo;
		Zend_Loader::loadClass('Zend_Filter_StripTags');
		Zend_Loader::loadClass('Zend_Validate_EmailAddress');
		Zend_Loader::loadClass('Zend_Validate_StringLength');
		Zend_Loader::loadClass('JumperAccount');
		Zend_Loader::loadClass('ConfirmationList');
		Zend_Loader::loadClass('Defaultprofile');
		$countWords = strlen($_SERVER['REQUEST_URI']);
		if (strpos($_SERVER['REQUEST_URI'], '/', $countWords-1) == true)
		{
			$this->_redirect(substr_replace($_SERVER['REQUEST_URI'], '', $countWords-1));
			//$this->view->testingLang = substr_replace($_SERVER['REQUEST_URI'], '', $countWords-1);
		}

		$this->view->user = Zend_Auth::getInstance()->getIdentity();
		
		# Links
		$registry = Zend_Registry::getInstance();
		$this->view->links = $registry->get('linksArray');
		# end of links
	}
	function indexAction()
	{
		//Header
		$this->view->keywords = 'Groupjump, Jumpsite, Group, Social, weblets, nextix, jumpstart';
		$this->view->description = 'Groupjump jumpstart area is a Home page of a jumper.  It is were they can create a jumpsite.  Jumpers\'s jumpsite is listed here.';
		$this->view->author = 'Edison Quinones Jr. and Vince Loremia';
		$this->view->robots = 'Index';
		$this->view->title = 'Groupjump, Your World on the web.Jump in! Jumpstart Area';		

		$this->view->PageContentTitle = 'leftLabelFeaturedGroup';
		
		$webInfoNamespace  = new Zend_Session_Namespace('webInfo');
		$webInfo = $webInfoNamespace->webInfo;
		$auth = Zend_Auth::getInstance();
		if (!$auth->hasIdentity())
		{
			$this->_redirect($webInfo);
		}
		# check if user flag_confirm is equal to zero
		$this->view->userInstance = Zend_Auth::getInstance()->getIdentity();
		# end of checking user flag_confirm is equal to zero
		
		
		//Page Located
		$this->view->stringToCompareWithTheLink = 'Jumpstart';
	}
}